package drds.data_propagate.task;

import drds.data_propagate.binlog_event.secondary.ClientId;
import drds.data_propagate.common.LifeCycle;
import drds.data_propagate.metadata.MetaDataManager;
import drds.data_propagate.parse.EventParser;
import drds.data_propagate.sink.EventListSink;
import drds.data_propagate.store.EventStore;

/**
 * 代表单个canal实例，比如一个destination会独立一个实例
 */
public interface Task extends LifeCycle {

    String getTaskId();

    EventParser getEventParser();

    EventListSink getEventListSink();

    EventStore getEventStore();

    MetaDataManager getMetaDataManager();

    /**
     * 客户端发生订阅/取消订阅行为
     */
    boolean subscribe(ClientId identity);


}
